import paddlex as pdx

def load_model(model_file):
    model = pdx.load_model(model_file)
    return model

def infer(image_file,model):
    result = model.predict(image_file)
    out_img = './output/'
    pdx.seg.visualize(image_file, result, weight=0.4, save_dir=out_img)